package gui.wizard;

import java.awt.*;
import java.net.*;
import javax.swing.*;
import javax.swing.border.*;

public class WelcomePanel extends JPanel {

    // Final Fields
    final String SIDEBARWIZARDLOC = "/img/sidebarWizard.jpg";
    // Fields
    private JLabel welcomeTitle;
    private JPanel contentPanel;
    private JLabel iconLabel;
    private ImageIcon icon;

    public WelcomePanel() {

        iconLabel = new JLabel();
        contentPanel = getContentPanel();
        contentPanel.setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));

        java.net.URL imageURL = WelcomePanel.class.getResource(SIDEBARWIZARDLOC);
        icon = new ImageIcon(imageURL);

        setLayout(new java.awt.BorderLayout());

        if (icon != null) {
            iconLabel.setIcon(icon);
        }

        iconLabel.setBorder(new EtchedBorder(EtchedBorder.RAISED));

        add(iconLabel, BorderLayout.WEST);

        JPanel secondaryPanel = new JPanel();
        secondaryPanel.add(contentPanel, BorderLayout.NORTH);
        add(secondaryPanel, BorderLayout.CENTER);
    }

    private JPanel getContentPanel() {

        JPanel contentPanel1 = new JPanel();
        JPanel jPanel1 = new JPanel();

        welcomeTitle = new JLabel();

        contentPanel1.setLayout(new java.awt.BorderLayout());

        welcomeTitle.setFont(new java.awt.Font("MS Sans Serif", Font.BOLD, 11));
        welcomeTitle.setText("<html>Welcome to Maia!<br><br></html>");
        contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH);
        jPanel1.setLayout(new java.awt.GridBagLayout());


        javax.swing.JTextArea tf = new JTextArea();
        tf.setBackground(null);
        tf.setEditable(false);
        tf.setText("Maia is a virtual world where you can build your own village.\n\n" +
                "Claw your way to the top and transform your village to a huge metropole,\n by making the right economic and military decisions. \n\n" +
                "Your victory will rely upon balanced choices and strong alliances! \n\n\n" +
                "Click next to enter the world of Maia....");

        jPanel1.add(tf);

        contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER);

        return contentPanel1;
    }
}
